#include "decoratorgraphicsitem.h"

DecoratorGraphicsItem::DecoratorGraphicsItem()
{
    this->_fillBlack = false;
}

void DecoratorGraphicsItem::setFillBlack(bool fillBlack)
{
    this->_fillBlack = fillBlack;
}

void DecoratorGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    QPainterPath painterPath;
    painterPath.addPolygon(this->polygon());

    if (this->_fillBlack) {
        painter->fillPath(painterPath, Qt::black);
    }

    else {
        painter->fillPath(painterPath, Qt::white);
    }

    QGraphicsPolygonItem::paint(painter, option, widget);
}
